package com.honglang.rss.impl;

import java.util.ArrayList;
import java.util.List;

public class Channel {
	
	/**The name of the channel. It's how people refer to your service. If you have 
		an HTML website that contains the same information as your RSS file,
		the title of your channel should be the same as the title of your website.
	**/
	private String title;
	
	
	/**
	 * The URL to the HTML website corresponding to the channel.
	 */
	private String link;
	
	
	/**
	 * Phrase or sentence describing the channel.
	 */
	private String description;
	
	
	/**
	 * The language the channel is written in. This allows aggregators to group 
	 * all Italian language sites, for example, on a single page. A list of 
	 * allowable values for this element, as provided by Netscape, is here. 
	 * You may also use values defined by the W3C.
	 */
	private String language;
	
	/**
	 * Copyright notice for content in the channel.
	 */
	private String copyright;
	
	/**
	 * The publication date for the content in the channel. 
	 * For example, the New York Times publishes on a daily basis, 
	 * the publication date flips once every 24 hours. 
	 * That's when the pubDate of the channel changes. 
	 * All date-times in RSS conform to the Date and Time Specification of RFC 822,
	 *  with the exception that the year may be expressed with two characters or 
	 *  four characters (four preferred).	
	 *  Example : Sat, 07 Sep 2002 00:00:01 GMT
	 */
	private String pubDate;
	
	
	/**
	 * Email address for person responsible for editorial content.
	 * Example : geo@herald.com;
	 */
	private String managingEditor;
	
	/**
	 * Email address for person responsible for technical issues relating to channel.
	 */
	private String webMaster;
	
	
	/**
	 * The last time the content of the channel changed.
	 * Example: Sat, 07 Sep 2002 09:42:31 GMT
	 */
	private String lastBuildDate;
	
	/**
	 * Specify one or more categories that the channel belongs to. 
	 * Follows the same rules as the <item>-level category element. 
	 */
	private String category;
	
	/**
	 * A string indicating the program used to generate the channel.	
	 * Example : MightyInHouse Content System v2.3
	 */
	private String generator;
	
	/**
	 * A URL that points to the documentation for the format used in the RSS file. 
	 * It's probably a pointer to this page. 
	 * It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.
	 */
	private String docs;
	
	
	/**
	 * Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.
	 * Example :<cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/>
	 */
	private String cloud;
	
	
	/**
	 * ttl stands for time to live. 
	 * It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. 
	 * Example : <ttl>60</ttl>
	 */
	private String ttl;
	
	
	/**
	 * Specifies a GIF, JPEG or PNG image that can be displayed with the channel.
	 */
	private String image;
	
	
	/**
	 * The PICS rating for the channel.
	 */
	private String rating;
	
	
	/**
	 * pecifies a text input box that can be displayed with the channel.
	 */
	private String textInput;
	
	
	/**
	 * A hint for aggregators telling them which hours they can skip. 
	 */
	private String skipHours;
	
	/**
	 * A hint for aggregators telling them which days they can skip.
	 */
	private String skipDays;
	
	
	private List<Item> itemList = new ArrayList<Item>();
	
	
	
	/**
	 *
	 * @param title
	 * @param link
	 * @param description
	 */
	public Channel(String title,String link,String description){
		
		this.setTitle(title);
		this.setLink(link);
		this.setDescription(description);
		
	}


	public String getTitle() {
		return title;
	}


	public void setTitle(String title) {
		this.title = title;
	}


	public String getLink() {
		return link;
	}


	public void setLink(String link) {
		this.link = link;
	}


	public String getDescription() {
		return description;
	}


	public void setDescription(String description) {
		this.description = description;
	}


	public String getLanguage() {
		return language;
	}


	public void setLanguage(String language) {
		this.language = language;
	}


	public String getCopyright() {
		return copyright;
	}


	public void setCopyright(String copyright) {
		this.copyright = copyright;
	}


	public String getPubDate() {
		return pubDate;
	}


	public void setPubDate(String pubDate) {
		this.pubDate = pubDate;
	}


	public String getManagingEditor() {
		return managingEditor;
	}


	public void setManagingEditor(String managingEditor) {
		this.managingEditor = managingEditor;
	}


	public String getWebMaster() {
		return webMaster;
	}


	public void setWebMaster(String webMaster) {
		this.webMaster = webMaster;
	}


	public String getLastBuildDate() {
		return lastBuildDate;
	}


	public void setLastBuildDate(String lastBuildDate) {
		this.lastBuildDate = lastBuildDate;
	}


	public String getCategory() {
		return category;
	}


	public void setCategory(String category) {
		this.category = category;
	}


	public String getGenerator() {
		return generator;
	}


	public void setGenerator(String generator) {
		this.generator = generator;
	}


	public String getDocs() {
		return docs;
	}


	public void setDocs(String docs) {
		this.docs = docs;
	}


	public String getCloud() {
		return cloud;
	}


	public void setCloud(String cloud) {
		this.cloud = cloud;
	}


	public String getTtl() {
		return ttl;
	}


	public void setTtl(String ttl) {
		this.ttl = ttl;
	}


	public String getImage() {
		return image;
	}


	public void setImage(String image) {
		this.image = image;
	}


	public String getRating() {
		return rating;
	}


	public void setRating(String rating) {
		this.rating = rating;
	}


	public String getTextInput() {
		return textInput;
	}


	public void setTextInput(String textInput) {
		this.textInput = textInput;
	}


	public String getSkipHours() {
		return skipHours;
	}


	public void setSkipHours(String skipHours) {
		this.skipHours = skipHours;
	}


	public String getSkipDays() {
		return skipDays;
	}


	public void setSkipDays(String skipDays) {
		this.skipDays = skipDays;
	}


	public List<Item> getItemList() {
		return itemList;
	}


	public void setItemList(List<Item> itemList) {
		this.itemList = itemList;
	}
	
	
	
	public void addItem(Item item){
		this.getItemList().add(item);
	}
	
}
